package models

import (
	"cloud-disk/core/internal/config"
	"github.com/go-redis/redis/v8"
)

func InitRedis(config config.Config) *redis.Client {
	rdb := redis.NewClient(&redis.Options{
		Addr:     config.Redis.Addr,
		Password: config.Redis.Password,
		DB:       config.Redis.DB,
	})
	return rdb
}
